#include <iostream>
using namespace std;
bool judge(int x)
{
    for (int i = 2; i <= x / i; ++i)
    {
        if (x % i == 0)
        {
            return false;
        }
    }
    return true;
}

int main()
{
    int n;
    cin >> n;
    int ans = 0;
    for (int i = 2; i < n; ++i)
    {
        if (judge(i))
        {
            ans++;
        }
    }
    cout << ans;
    return 0;
}